﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Create.Master" Inherits="System.Web.Mvc.ViewPage<Langben.DAL.Area>" %>

<%@ Import Namespace="Common" %>
<%@ Import Namespace="Langben.App.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CurentPlace" runat="server">
    创建 数据字典
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>
            <input class="a2 f2" type="submit" value="创建" />
            <input class="a2 f2" type="button" onclick="BackList('Area')" value="返回" />
        </legend>
        <div class="bigdiv">

            <div class="editor-label">
                <%: Html.LabelFor(model => model.MyTexts) %>：
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.MyTexts) %>
                <%: Html.ValidationMessageFor(model => model.MyTexts) %>
            </div>
            <div class="editor-field" style="display: none">
                <%: Html.EditorFor(model => model.ParentId) %>
                <%: Html.ValidationMessageFor(model => model.ParentId) %>
            </div>

            <div class="editor-label" style="display: none">
                <%: Html.LabelFor(model => model.MyTables) %>：
            </div>
            <div class="editor-field" style="display: none">
                <%: Html.EditorFor(model => model.MyTables) %>
                <%: Html.ValidationMessageFor(model => model.MyTables) %>
            </div>
            <div class="editor-label" style="display: none">
                <%: Html.LabelFor(model => model.MyColums) %>：
            </div>
            <div class="editor-field" style="display: none">
                <%: Html.EditorFor(model => model.MyColums) %>
                <%: Html.ValidationMessageFor(model => model.MyColums) %>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Sort) %>：
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Sort, new {  onkeyup = "isInt(this)", @class="text-box single-line" })%>
                <%: Html.ValidationMessageFor(model => model.Sort) %>
            </div>
            <br style="clear: both;" />
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Remark) %>：
            </div>
            <div class="textarea-box">
                <%: Html.TextAreaFor(model => model.Remark) %>
                <%: Html.ValidationMessageFor(model => model.Remark) %>
            </div>
            <div class="editor-label" style="display: none" id="pian1">
                <%: Html.LabelFor(model => model.Pai) %>：
            </div>
            <div class="editor-field" style="display: none" id="pian2">
                <%=Html.DropDownListFor(model => model.Pai,Models.SysFieldModels.GetSysField("Area","Pai"),"请选择")%>

                <%: Html.ValidationMessageFor(model => model.Pai) %>
            </div>

            <div class="editor-label" style="display: none" id="pian3">
                <%: Html.LabelFor(model => model.Hao) %>：
            </div>
            <div class="editor-field" style="display: none" id="pian4">
                <%=Html.DropDownListFor(model => model.Hao,Models.SysFieldModels.GetSysField("Area","Hao"),"请选择")%>
                <%: Html.ValidationMessageFor(model => model.Hao) %>
            </div>
        </div>
    </fieldset>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">

    <script type="text/javascript">
        $(function () {
            $('#ParentId').val('<%= ViewData["Parentid"] %>');
            $.ajax({
                url: "../GetMyColums",
                type: "Post",
                data: { rowguid: '<%= ViewData["Parentid"] %>' },
                dataType: "text",
                success: function (data) {
                    if (data == "Pian") {
                        $("div[id^='pian']").css("display", "block");
                    }
                }
            });

        });


    </script>
</asp:Content>

